package com.brillilab.domain.enums.file;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author zlb
 * @Title: 文件上传状态枚举
 * @ProjectName brill_lab
 * @Description: TODO
 * @date 2019/5/11 12:00
 */
@Getter
@AllArgsConstructor
public enum UploadStausEnum {
    Fail("上传失败",-1),
    UnUpload("未上传",0),
    Uploading("正在上传",1),
    Uploaded("已上传",2);
    public String name;
    private Integer value;

    public static String getKey(Integer value) {
        for (UploadStausEnum p : UploadStausEnum.values()) {
            if (p.getValue().equals(value)) {
                return p.name;
            }
        }
        return null;
    }
}
